<?php defined('_JEXEC') or die('Restricted access'); ?>
<script type="text/javascript">
function submitbutton(pressbutton){	
	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return;
	}
	if (pressbutton == 'save') {
		var form = document.adminForm;
		if ( form.name.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Name Not Null' )?>" );
			return;
		}else if ( form.appKey.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store AppKey Not Null' )?>" );
			return;
		}else if ( form.appSecret.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store AppSecret Not Null' )?>" );
			return;
		}else if ( form.username.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Username Not Null' )?>" );
			return;
		}else if ( form.pwd.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Pwd Not Null' )?>" );
			return;
		}else if ( form.seller_name.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Seller Name Not Null' )?>" );
			return;
		}else if ( form.seller_area_id.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Area Id Not Null' )?>" );
			return;
		}else if ( form.seller_address.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Seller Address Not Null' )?>" );
			return;
		}else if ( form.seller_zip.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Seller Zip Not Null' )?>" );
			return;
		}else if ( form.seller_phone.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Seller Phone Not Null' )?>" );
			return;
		}else if ( form.seller_mobile.value == "" ) {
			alert( "<?php echo JText::_( 'Taobao Store Seller Mobile Not Null' )?>" );
			return;
		}else{
			submitform( pressbutton );
		}
	}	
}

</script> 
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Details' ); ?></legend>

		<table class="admintable">
		<tr>
			<td colspan=2><?php echo JText::_( 'Taobao Store Notice' );?></td>
		</tr>	
		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'Taobao Store Name' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="name" id="name" size="32" maxlength="250" value="<?php echo $this->store->name;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="AppKey">
					<?php echo JText::_( 'Taobao Store AppKey' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="appKey" id="appKey" size="32" maxlength="250" value="<?php echo $this->store->appKey;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="AppSecret">
					<?php echo JText::_( 'Taobao Store AppSecret' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="appSecret" id="appSecret" size="32" maxlength="250" value="<?php echo $this->store->appSecret;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Username">
					<?php echo JText::_( 'Taobao Store Username' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="username" id="username" size="32" maxlength="250" value="<?php echo $this->store->username;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Pwd">
					<?php echo JText::_( 'Taobao Store Pwd' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="password" name="pwd" id="pwd" size="32" maxlength="250" value="<?php echo $this->store->pwd;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Status">
					<?php echo JText::_( 'Taobao Store Status' ); ?>:
				</label>
			</td>
			<td>			
				<input type="radio" name="status" value="1" <?php if ($this->store->status!=2){?>checked<?php }?>> <?php echo JText::_( 'Open' ); ?> 
				<input type="radio" name="status" value="2" <?php if ($this->store->status==2){?>checked<?php }?>> <?php echo JText::_( 'Close' ); ?> *
			</td>
		</tr>
		<tr>
			<td width="100" colspan="2">				
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Taobao Store Seller Name">
					<?php echo JText::_( 'Taobao Store Seller Name' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="seller_name" id="seller_name" size="32" maxlength="250" value="<?php echo $this->store->seller_name;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Taobao Store Seller Area Id">
					<?php echo JText::_( 'Taobao Store Seller Area Id' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="seller_area_id" id="seller_area_id" size="32" maxlength="250" value="<?php echo $this->store->seller_area_id;?>" /> *
				<?php echo JText::_( 'Taobao Store Seller Area Id Description' ); ?>
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Taobao Store Seller Address">
					<?php echo JText::_( 'Taobao Store Seller Address' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="seller_address" id="seller_address" size="32" maxlength="250" value="<?php echo $this->store->seller_address;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Taobao Store Seller Zip">
					<?php echo JText::_( 'Taobao Store Seller Zip' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="seller_zip" id="seller_zip" size="32" maxlength="250" value="<?php echo $this->store->seller_zip;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Taobao Store Seller Phone">
					<?php echo JText::_( 'Taobao Store Seller Phone' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="seller_phone" id="seller_phone" size="32" maxlength="250" value="<?php echo $this->store->seller_phone;?>" /> *
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="Taobao Store Seller Mobile">
					<?php echo JText::_( 'Taobao Store Seller Mobile' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="seller_mobile" id="seller_mobile" size="32" maxlength="250" value="<?php echo $this->store->seller_mobile;?>" /> *
			</td>
		</tr>
	</table>
	</fieldset>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_set" />
<input type="hidden" name="id" value="<?php echo $this->store->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="store" />
</form>
